package com.woniu83.singleton;
/**
 * author: SuTing  <br/>
 * Date: 2021/11/10:8:44  <br/>
 * Description:
 */
public class CreatePerson {
    public static void main(String[] args) {
        Person person1 =Factory.getBean("American");
        Person person2 =Factory.getBean("American");
        Person person3 =Factory.getBean("American");
        System.out.println(person1);
        System.out.println(person2);
        System.out.println(person3);
        Factory.getBean("American").eat();
        Factory.getBean("Chinese").eat();
        Factory.getBean("Jap").eat();

    }
}
